home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_61284.txt < prev    next >
Text File  |  1991-02-27  |  2KB  |  37 lines

  1. -- card: 61284 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 6
  9. ----- text -----
  10. 9.2  Portability & the Macintosh
  11.  
  12. -- part contents for background part 4
  13. ----- text -----
  14. Restriction to writing completely portable programs prevents the programmer from taking advantage of useful features specific to a single environment.  For example the Macintosh ROM "Toolbox" provides many invaluable routines for writing Macintosh programs.
  15.  
  16. It is often possible to confine non-portable code to individual program modules to allow reuse of the remaining code in other environments.  One way of isolating non-portable code is to define an abstract class from which machine-specific versions may be derived.
  17.  
  18. The files listed in the following pages implement the TC abstract Screen class for general-purpose 2-dimensional graphics combined with stdio-style output.  The      Mac_Screen class is derived from this class for use on the Macintosh, but C++ versions* for DOS or UNIX graphics-capable systems may readily be derived as well.  This allows portable applications with simple graphics output.
  19.  
  20. TC's MacTraps library is required for applications using the Mac_Screen class.  TC's precompiled header MacHeaders automatically declares the Toolbox functions.
  21.  
  22.  
  23. -- part contents for background part 7
  24. ----- text -----
  25. 204
  26.  
  27. -- part contents for background part 29
  28. ----- text -----
  29. 55726
  30.  
  31. -- part contents for background part 27
  32. ----- text -----
  33. TC/C++ portability
  34.  
  35. -- part contents for background part 20
  36. ----- text -----
  37. TC/C++ portability - p183